package com.planet.goods.feigo;

import com.planet.goods.pojo.Sku;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(name = "goods")
@RequestMapping("/search")
public interface SkuFeign {
    @GetMapping
    Map search(@RequestParam(required = false) Map searchMap);

    @PostMapping(value = "/sku")
    public Result<List<Sku>> findList(@RequestBody(required = false)Sku sku);

    @GetMapping("/{id}")
    public Result<Sku> findById(@PathVariable(name = "id")Long id);

    @PostMapping(value = "/becr/count")
    Result decrCount(@RequestParam(value = "username") String username);

}
